AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones y constantes de las API de Windows
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Realiza el cifrado asimétrico de un sobre que ha sido cifrado con <Buffer type>.EncryptAsymmetricEnvelopped.
Ejemplo
// Encrypting a character string
//---------------------------------------
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
sPublicKeyFile is string = fExeDir() + "\PublicKey.pem"
sPublicKeyPassword is string = "xxx"
 
bufEncryptedMessage = bufToEncrypt.EncryptAsymmetricEnveloped(sPublicKeyFile, ...
sPublicKeyPassword)
 
// Decryption  
// -------------
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem"
sPrivateKeyPassword is string = "xxx"
 
bufDecryptedMessage = bufEncryptedMessage.DecryptAsymmetricEnveloped(sPrivateKeyFile, ...
sPrivateKeyPassword)
bufToEncrypt is Buffer = "Message to encrypt"
bufEncryptedMessage is Buffer
bufPublicKey is Buffer
bufPrivateKey is Buffer
(bufPrivateKey, bufPublicKey) = EncryptGenerateRSAKey(1024)
// Encrypting a character string
//---------------------------------------
bufEncryptedMessage = bufToEncrypt.EncryptAsymmetricEnveloped(bufPublicKey)
 
// Decryption  
// -------------
bufEncryptedMessage is Buffer
bufDecryptedMessage is Buffer
 
bufDecryptedMessage = bufEncryptedMessage.DecryptAsymmetricEnveloped(bufPrivateKey)
Sintaxis
<Result> = <Content to decrypt>.DecryptAsymmetricEnveloped(<Private key file> [, <Password>])
<Result>: Buffer
Contenido desencriptado.
<Content to decrypt>: Buffer
Mensaje a desencriptar correspondiente al contenido de <Buffer type>.EncryptAsymmetricEnvelopped.
<Private key file>: Cadena de caracteres o memoria intermedia
  • Nombre y ruta del archivo que corresponde a la clave privada RSA que se utilizará para descifrar los datos. Los formatos de clave pem, y p12 están soportados.
  • Buffer que contiene la clave privada RSA que se utilizará para descifrar los datos.
<Password>: Cadena de caracteres opcional
Contraseña del archivo de claves (si es necesario).
Componente: wd290com.dll
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2024

Señalar un error o enviar una sugerencia | Ayuda local